package com.ringtheweb.common.util;


/**
 * Math utility class
 * @author ldewavri
 *
 */
public class MathUtils {
	
	/**
	 * Determines if number is a power of 2
	 * @param number the number to be tested
	 * @return true if it is a power of 2, false otherwiser
	 */
	public static boolean isAPowerOf2(int number) {
		return number != 0 && (number & (number -1 )) == 0;
	}

}
